package main

import (
	"fmt"
	"regexp"
)

func main() {

	fmt.Println(MustCompile(`^https?:`).MatchString("https://xaaef.com"))

	panic(fmt.Sprintf("invalid suit %q", "hello"))
}

func Compile(expr string) (*regexp.Regexp, error) {
	return regexp.Compile(expr)
}

func MustCompile(expr string) *regexp.Regexp {
	if re, err := Compile(expr); err != nil {
		panic(err)
	} else {
		return re
	}
}
